script

Purpose

The script component is used to specify the script codes running at the browser. Notice that, unlike zscript, the script codes are running at the browser. They are usually written in JavaScript which is supported by the most of browsers. The simplest format is as follows.

Examples

<z:window id="win">
    <z:button label="change color" onClick="Clients.evalJavaScript('myfunc()');"/>
</z:window>
<z:script type="text/javascript">
    function myfunc() {
        jq("$win").css("backgroundColor", "blue");
    }
</z:script>

Description

Attributes

ZK Official Reference

Component Reference

Show script Component Reference

Java API

Show script Java API